<template>
  <section>
    <ul>
      <li
      v-for="(item, index) in list"
      :key="index">
      <div class="item-title border-bottom">
        <span class="item-title-icon"></span>
        {{item.title}}
      </div>
      <div v-if="item.children" class="item-children">
        <detail-list :list="item.children"></detail-list>
      </div>
      </li>
    </ul>
  </section>
</template>
<script>
export default {
  name: 'detailList',
  props: {
    list: Array
  }
}
</script>
<style lang="stylus" scoped>
.item-title
  line-height .8rem
  font-size .32rem
  padding 0 .2rem
  text-indent .5rem
  font-size .32rem
  .item-title-icon
    background url('http://s.qunarzz.com/piao/image/touch/sight/detail.png') 0 -.45rem no-repeat
    position absolute
    background-size .4rem 3rem
    height .36rem
    width .36rem
    top .2rem
    left .2rem
    display inline-block
    margin-right .1rem
.item-children
  margin-left .2rem
</style>
